This file details how to replicate all models and Figures
in "Coalition Inclusion Probabilities: A Party-Strategic
 Measure for Predicting Policy and Politics"
Author: Mark A. Kayser, Matthias Orlowski, Jochen Rehmert

Cite: Kayser, Mark A., Matthias Orlowski and Jochen Rehmert (forthcoming): "Coalition Inclusion Probabilities: A Party-Strategic
 Measure for Predicting Policy and Politics", Political Science Research and Methods

Our predicted coalition inclusion probabilities (CIP) will
 be made available on coalition-leverage.org and updated 
periodically.

R version: 4.0.2 (2020-06-22) (Windows)
In the R Scripts below a range of libraries
and packages are used and may have to be 
installed first.


The replication files come in several data-sets and 
R Scripts. 

List of data:
- data_deficit.RDS
	Contains data on the Government Spending 
	Application.
	Use to produce Table 5 in the manuscript
	and Tables G1 and G2 in the Appendix.
- data_eps.RDS
	Contains data on the Environmental Policy 
	Stringency Application.
	Use to produce Table 6 in the manuscript 
	and Tables G3 and G4 in the Appendix.
- data_estimation.RDS
	Contains coalition-level data for estimation
	of the final model.
	Use to produce Table E2 in the Appendix.
- data_Figure1.RDS
	Contains mock data for creating Figure 1
	illustrating the premise of calculating
	coalition inclusion probabilities.
	Use to produce Figure 1 in the manuscript.
- data_Table2.RDS
	Contains coalition-level data used for in-
	and out-of-sample comparison of several
	model specifications and model estimation. 
	Use to produce Table 2, Table 3, Table 4 in
	in the manuscript and Table B1, Table B2,
	Table D1, Table E1, Table F2 in the Appendix.
	Use to produce Figure 2 in the manuscript and
	Figure E1 and E2 in the Appendix.
- estimation_cee_pf.RDS
	Contains data on potential coalitions for
	estimation of coalition formation models.
	This data-set contains as ideology-variable
	an indicator based on party families.
	Use to produce Table F3 in the Appendix.
- estimation_cee_rile.RDS
	Contains data on potential coalitions for
	estimation of coalition formation models.
	This data-set contains as ideology-variable
	an indicator based on left-right positions.
	Use to produce Table F3 in the Appendix.
- des_data.RDS
	Contains party-level coalition inclusion
	probabilities to produce the descriptive
	Figures F1, F2 and F3 in the Appendix.
- valid_data.RDS
	Contains party-level coalition inclusion
	probabilities to create Table F1 in the Appendix.


List of R Script:
- Functions
	- fun_predCL.R -> function to calculate coalition
			  level predicted probabilities
	- fun_getPrIngov.R -> function to calculate party
			  level predicted probabilities
	- getTopThree.R -> function to explore near misses
			   among predicted coalitions

- replication_app_deficit.R:
	Use to produce Table 5 in the manuscript and
	Table G1 and G2 in the Appendix.
	Needs: 
	- data_deficit.RDS
- replication_app_EPS.R:
	Use to produce Table 6 in the manuscript and
	Tables G2 and G4 in the Appendix.
	Needs: 
	- data_eps.RDS	
- replication_appendix_F.R:
	Use to produce Figure F1, F2 and F3 as well
	Table F1, F2 and F3 in the Appendix.
	Needs: 
	- estimation_cee_rile.RDS
	- estimation_cee_pf.RDS
	- data_Table2.RDS
	- des_data.RDS
	- valid_data.RDS
- replication_coalition.R:
	Use to produce Tables 2, 3 and 4 in the manuscript.
	Use to produce Table B1, B2, D1, E1, F2 in the 
	Appendix.
	Use to produce Figure 2 in the manuscript and
	Figures E1 and E2 in the Appendix.
	Needs:
	- fun_predCL.R
	- fun_getPrIngov.R
	- getTopThree.R
	- data_Table2.RDS
- replication_Figure1.R:
	Use to produce Figure 1 in the manuscript.
	Needs:
	- data_Figure1.RDS
- replication_TableE2.R
	Use to produce Table E2 in the Appendix.
	Needs: data_estimation.RDS

All Scripts run individually. There is no need to run them in a specified order.
However, within Scripts, code shall be executed in order.